
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for prtTemplate.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="prtTemplateForm"
 */
public class PrtTemplateForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _tableGuid = null;
   private java.lang.String _tableUri = null;
   private java.sql.Blob _tableTemplate = null;
   private java.lang.String _prtScheme = null;
   private java.lang.String _remark1 = null;
   private java.lang.String _remark2 = null;
   private java.lang.String _remark3 = null;
   private java.lang.String _remark4 = null;

   /**
    * Standard constructor.
    */
   public PrtTemplateForm() {
   }

   /**
    * Returns the tableGuid
    *
    * @return the tableGuid
    */
   public java.lang.String getTableGuid() {
      return _tableGuid;
   }

   /**
    * Sets the tableGuid
    *
    * @param tableGuid the new tableGuid value
    */
   public void setTableGuid(java.lang.String tableGuid) {
      _tableGuid = tableGuid;
   }
   /**
    * Returns the tableUri
    *
    * @return the tableUri
    */
   public java.lang.String getTableUri() {
      return _tableUri;
   }

   /**
    * Sets the tableUri
    *
    * @param tableUri the new tableUri value
    */
   public void setTableUri(java.lang.String tableUri) {
      _tableUri = tableUri;
   }
   /**
    * Returns the tableTemplate
    *
    * @return the tableTemplate
    */
   public java.sql.Blob getTableTemplate() {
      return _tableTemplate;
   }

   /**
    * Sets the tableTemplate
    *
    * @param tableTemplate the new tableTemplate value
    */
   public void setTableTemplate(java.sql.Blob tableTemplate) {
      _tableTemplate = tableTemplate;
   }
   /**
    * Returns the prtScheme
    *
    * @return the prtScheme
    */
   public java.lang.String getPrtScheme() {
      return _prtScheme;
   }

   /**
    * Sets the prtScheme
    *
    * @param prtScheme the new prtScheme value
    */
   public void setPrtScheme(java.lang.String prtScheme) {
      _prtScheme = prtScheme;
   }
   /**
    * Returns the remark1
    *
    * @return the remark1
    */
   public java.lang.String getRemark1() {
      return _remark1;
   }

   /**
    * Sets the remark1
    *
    * @param remark1 the new remark1 value
    */
   public void setRemark1(java.lang.String remark1) {
      _remark1 = remark1;
   }
   /**
    * Returns the remark2
    *
    * @return the remark2
    */
   public java.lang.String getRemark2() {
      return _remark2;
   }

   /**
    * Sets the remark2
    *
    * @param remark2 the new remark2 value
    */
   public void setRemark2(java.lang.String remark2) {
      _remark2 = remark2;
   }
   /**
    * Returns the remark3
    *
    * @return the remark3
    */
   public java.lang.String getRemark3() {
      return _remark3;
   }

   /**
    * Sets the remark3
    *
    * @param remark3 the new remark3 value
    */
   public void setRemark3(java.lang.String remark3) {
      _remark3 = remark3;
   }
   /**
    * Returns the remark4
    *
    * @return the remark4
    */
   public java.lang.String getRemark4() {
      return _remark4;
   }

   /**
    * Sets the remark4
    *
    * @param remark4 the new remark4 value
    */
   public void setRemark4(java.lang.String remark4) {
      _remark4 = remark4;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getTableGuid() == null) {
         errors.add("tableGuid", new ActionError("error.tableGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
